import { PrimaryGeneratedColumn } from "typeorm";
import { Code, CreateDate, Digdit, Entity, Jsonb, UpdateDate } from "../utils";

@Entity({
    name: 'ks_device'
})
export class KsDevice {

    @PrimaryGeneratedColumn()
    id: number;

    @Code({ comment: '设备ID' })
    uuid: string;

    @Code({ comment: '设备名' })
    name: string;

    @Code({ comment: '拥有者' })
    owner: string;

    @Digdit({ comment: '总收益', default: 0 })
    total: number;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;

    @Jsonb({nullable: true})
    setting: any;
}
